{	Problem: http://codeforces.ru/problemset/problem/73/A
	Verdict: Accepted
}
uses math;
var a,b,c,k:int64;
procedure swap(var a,b:int64);
var t:int64;
begin
t:=a;
a:=b;
b:=t;
end;
begin
read(a,b,c,k);
if a>b then swap(a,b);
if b>c then swap(b,c);
if a>b then swap(a,b);
a:=min(a-1,k div 3);
dec(k,a);
b:=min(b-1,k div 2);
dec(k,b);
c:=min(c-1,k);
inc(a);
inc(b);
inc(c);
write(a*b*c);
end.